<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <table id="exampleTable" data-mobile-responsive="true"  class="table table-hover table-striped">
                    <thead>
                    <tr>
                        <th style="width: 200px" data-field="id" tabindex="0">
                            <div class="th-inner ">文本类型</div>
                            <div class="fht-cell"></div>
                        </th>
                        <th style="width: 200px" data-field="name" tabindex="0">
                            <div class="th-inner ">内容</div>
                            <div class="fht-cell"></div>
                        </th>
                        <th style="width: 200px" data-field="id" tabindex="0">
                            <div class="th-inner ">操作</div>
                            <div class="fht-cell"></div>
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr data-index="0"  th:each="list:${list}">
                        <td th:text="${list.str}"></td>
                        <td th:text="${list.text}"></td>
                        <td style=" " shiro:hasPermission="activity:text:edit">
                            <a class="btn btn-primary btn-sm " href="#" title="编辑"
                               mce_href="#"th:onclick="edit([[${list.id}]])" ><i class="fa fa-edit"></i></a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
<div>
    <script type="text/javascript">

        function edit(id) {
            layer.open({
                type : 2,
                title : '编辑',
                maxmin : true,
                shadeClose : false, // 点击遮罩关闭层
                area : [ '800px', '520px' ],
                content : '/activity/text/edit/' + id // iframe的url
            });
        }


    </script>
</div>

</div>
<div th:include="include :: footer"></div>
</body>
</html>